package org.example.design.command;

import org.example.design.command.cook.impl.GuangDongCook;
import org.example.design.command.cook.impl.JiangSuCook;
import org.example.design.command.cook.impl.ShanDongCook;
import org.example.design.command.cook.impl.SichuanCook;
import org.example.design.command.cuisine.impl.GuangDongCuisine;
import org.example.design.command.cuisine.impl.JiangSuCuisine;
import org.example.design.command.cuisine.impl.ShanDongCuisine;
import org.example.design.command.cuisine.impl.SichuanCuisine;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2020/11/9 2:23 下午
 * @Created by xiangjd
 */
public class Test {
    public static void main(String[] args) {
        XiaoEr xiaoEr = new XiaoEr();
        xiaoEr.order(1);
        xiaoEr.order(2);
        xiaoEr.order(3);
        xiaoEr.order(4);

        xiaoEr.placeHolder();
    }

    @org.junit.Test
    public void test1() {
        // 菜系 + 厨师;广东(粤菜)、江苏(苏菜)、⼭山东(鲁菜)、四川(川菜)

        GuangDongCuisine guangDoneCuisine = new GuangDongCuisine(new GuangDongCook());
        JiangSuCuisine jiangSuCuisine = new JiangSuCuisine(new JiangSuCook());
        ShanDongCuisine shanDongCuisine = new ShanDongCuisine(new ShanDongCook());
        SichuanCuisine siChuanCuisine = new SichuanCuisine(new SichuanCook());

        org.example.design.command.caller.XiaoEr xiaoEr = new org.example.design.command.caller.XiaoEr();
        xiaoEr.order(guangDoneCuisine);
        xiaoEr.order(jiangSuCuisine);
        xiaoEr.order(shanDongCuisine);
        xiaoEr.order(siChuanCuisine);

        xiaoEr.placeOrder();

    }
}
